//package util;
//
//import javax.mail.Message;
//import javax.mail.MessagingException;
//import javax.mail.Session;
//import javax.mail.Transport;
//import javax.mail.internet.AddressException;
//import javax.mail.internet.InternetAddress;
//import javax.mail.internet.MimeMessage;
//import java.util.Properties;
//
//
//public class EmailSender {
//    public static void sendEmail(String receiver, String content) throws AddressException, MessagingException {
//        Properties properties = new Properties();
//        properties.put("mail.transport.protocol", "smtp");
//        properties.put("mail.smtp.host", "smtp.qq.com");
//        properties.put("mail.smtp.port", 465);
//        properties.put("mail.smtp.auth", "true");
//        properties.put("mail.smtp.ssl.enable", "true");
//        Session session = Session.getInstance(properties);
//        session.setDebug(true);
//        Message message = new MimeMessage(session);
//        message.setFrom(new InternetAddress("1623427947@qq.com"));
//        InternetAddress to = new InternetAddress(receiver);
//        message.setRecipient(MimeMessage.RecipientType.TO, to);
//        message.setSubject("TBlog");
//        message.setText(content);
//        Transport transport = session.getTransport();
//        transport.connect("1623427947@qq.com", "ulmhxkequxamdegh");
//        transport.sendMessage(message, message.getAllRecipients());
//        transport.close();
//    }
//    public static String getSecurityCode(int cnt) {
//        int multiple=1;
//        for(int i=0;i<cnt-1;i++){
//            multiple*=10;
//        }
//        int newNum = (int)((Math.random()*9+1)*multiple);
//        return String.valueOf(newNum);
//    }
//}
